import request from '@/router/axios'

export function fetchList(query) {
  return request({
    url: '/integration/syncJob/page',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/integration/syncJob',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: '/integration/syncJob/' + id,
    method: 'get'
  })
}

export function delObj(id) {
  return request({
    url: '/integration/syncJob/' + id,
    method: 'delete'
  })
}

export function putObj(obj) {
  return request({
    url: '/integration/syncJob',
    method: 'put',
    data: obj
  })
}


// 查询数据同步调度任务列表
export function listJob(query) {
  return request({
    url: '/integration/syncJob/list',
    method: 'get',
    params: query
  })
}

// 导出数据同步调度任务
export function exportJob(query) {
  return request({
    url: '/integration/syncJob/export',
    method: 'get',
    params: query
  })
}

// 校验任务名是否存在
export function verifyJobName(jobName) {
  return request({
    url: '/integration/syncJob/verifyJobName/' + jobName,
    method: 'get'
  })
}

